package com.mall.bargain;

import com.mall.utils.IdWorker;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
/**
 * 砍价模块
 * EnableScheduling 开启定时任务
 * @author  LiJinYang
 * @email  283006176@qq.com
 * @date 2021/07/19 16:54
 * @version 1.0
 */


@SpringBootApplication
@MapperScan("com.mall.bargain.mapper")
@EnableDiscoveryClient
@EnableCaching
@EnableScheduling
@EnableFeignClients
public class BargainApplication {

    public static void main(String[] args) {
        SpringApplication.run(BargainApplication.class, args);
    }

    @Bean
    public IdWorker idWorker(){
        return new IdWorker();
    }

}
